package kr.co.sdworld.api.apns.repository.cert;

import kr.co.sdworld.api.apns.model.ApnsCert;
import kr.co.sdworld.api.apns.model.mapper.ApnsCertMapper;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

@Repository
public class ApnsCertDaoImpl extends SqlSessionDaoSupport implements ApnsCertDao 
{
	@Override
	public int create(ApnsCert apnsCert) 
	{
		ApnsCertMapper mapper = getSqlSession().getMapper( ApnsCertMapper.class);
		return mapper.insertSelective( apnsCert);
	}
	
	@Override
	public ApnsCert getApnsCert(String appId) {
		
		ApnsCertMapper mapper = getSqlSession().getMapper( ApnsCertMapper.class);
		ApnsCert cert = mapper.selectByPrimaryKey(appId);
		return cert;
	}
}
